<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>星晨男科医院动态管理系统</title>
    <link rel="stylesheet" href="../css/page-health-orderDetail.css"/>
    <script src="../plugins/vue/vue.js"></script>
    <script src="../plugins/vue/axios-0.18.0.js"></script>
    <script src="../plugins/healthmobile.js"></script>
    <script src="../plugins/elementui/index.js"></script>
    <link rel="stylesheet" href="../plugins/elementui/index.css">
    <script>
        var id = getUrlParam("orderId");
    </script>
</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div id="app" class="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">传智健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="card">
            <div class="project-img">
                <img :src="imgUrl" width="100%" height="100%"/>
            </div>
            <div class="project-text">
                <h4 class="tit">{{setmeal.name}}</h4>
                <h6 class="tit">体检人:{{member.name}}</h6>
                <h6 class="tit">体检日期:{{order.orderDate}}</h6>
            </div>
        </div>
        <div class="table-listbox">
            <div class="box-title">
                <i class="icon-zhen"><span class="path1"></span><span class="path2"></span></i>
                <span>健康师建议及治疗方案</span>
            </div>
            <div class="box-table">
                <div class="table-content">
                    <ul class="table-list">
                        <li class="table-item">
                            <div class="item flex2">健康师姓名</div>
                            <div class="item flex3">{{healthteacher}}</div>
                        </li>
                        <li class="table-item">
                            <div class="item flex2">健康师意见</div>
                            <div class="item flex3">{{healthadvices}}</div>
                        </li>
                        <li class="table-item">
                            <div class="item flex2">建议药物</div>
                            <div class="item flex3">
                                <label v-for="medicine in medicines">
                                    {{medicine.name}}
                                </label>
                            </div>
                        </li>
                        <li class="table-item">
                            <div class="item flex2">建议运动</div>
                            <div class="item flex3">
                                <label v-for="travel in travels">
                                    {{travel.name}}
                                </label>
                            </div>
                        </li>
                        <li class="table-item">
                            <div class="item flex2">建议膳食</div>
                            <div class="item flex3">
                                <label v-for="food in foods">
                                    {{food.name}}
                                </label>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="box-button">
                    <a href="index.html" class="order-btn">返回</a>
                </div>
            </div>
        </div>
    </div>
</div>
<script>

    var vue = new Vue({
        el: '#app',
        data: {
            value1:'',
            imgUrl: null,//套餐对应的图片链接
            setmeal: {},
            member: {},
            order: {},
            healthteacher: '',
            healthadvices: '',

            medicines: [],
            travels: [],
            foods: [],
        },
        methods: {},
        mounted() {
            //发送ajax请求，根据套餐ID查询套餐详细信息（包括套餐基本信息、套餐包含的检查组、检查组包含的检查项）
            axios.get("/report/FindHealthReport.do?id=" + id).then((response) => {
                if (response.data.flag) {
                    this.setmeal = response.data.data.setmeal;
                    this.imgUrl = 'http://qiw5r3qf0.hd-bkt.clouddn.com/' + this.setmeal.img;
                    this.member = response.data.data.member;
                    this.order = response.data.data.order;

                    this.healthadvices = response.data.data.healthadvices;
                    this.healthteacher = response.data.data.healthteacher;

                    this.medicines = response.data.data.medicines;
                    this.travels = response.data.data.travels;
                    this.foods = response.data.data.foods;
                }
            });
        }
    });
</script>
<script>
    export default {
        data() {
            return {
                value1: null,
                colors: ['#99A9BF', '#F7BA2A', '#FF9900']  // 等同于 { 2: '#99A9BF', 4: { value: '#F7BA2A', excluded: true }, 5: '#FF9900' }
            }
        }
    }
</script>
</body>